/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

@import "pages/turnitin.scss";
@import "base/environment";

// DO NOT ADD ANYTHING TO THIS FILE
// there is certainly a better place to put whatever it is that you were thinking
// about putting here. Ask the UX team if you need advice.
//
// In fact, you will get a cookie for anything that you safely remove from this.

#instructure_ajax_error_box {
  display: none;
  position: fixed;
  top: 10px;
  left: 50px;
  z-index: 9999;
  background-color: #fff;
  border: 2px solid #888;
}

#instructure_ajax_error_result {
  width: 600px;
  height: 300px;
  overflow: auto;
}

#fixed_bottom, #flash_message_holder {
  position: fixed;
  z-index: 100000;
  left: 0;
  width: 100%;
}

// contains copies of all static messages so that we reserve enough height in the ui
#flash_message_buffer {
  visibility: hidden;
}

#flash_message_holder {
  height: 0;
}

#flash_message_holder, #flash_message_buffer {
  top: 0;
  list-style: none;
  margin: 0;
  padding: 0;

  li {
    // when the flash message is first child of the message_holder,
    // add margin at the top of the screen per design team
    &.ic-flash-info:first-child,
    &.ic-flash-success:first-child,
    &.ic-flash-warning:first-child,
    &.ic-flash-error:first-child {
      margin-top: $ic-sp;
    }
  }

  li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error), .ui-effects-wrapper {
    margin: 0 auto !important;
  }
  li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error) {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    border-bottom-color: rgba(0, 0, 0, 0.5);
    padding: 4px 40px 4px 8px;
    min-height: 20px;
    vertical-align: middle;
    text-align: center;
    font-weight: bold;
    position: relative;
    z-index: 2;
    width: 400px;
    &.static_message {
      width: auto;
    }
    a {
      text-decoration: underline;
      color: inherit;
    }
    .close_link {
      position: absolute;
      right: 10px;
      top: 50%;
      width: 20px;
      height: 20px;
      overflow: hidden;
      margin-top: -11px;
      color: white;
      text-decoration: none;
    }
    i {
      display: inline-block;
      vertical-align: middle;
      margin-right: 0;
      width: 20px;
      height: 20px;
      background-image: url(/images/check_16.png);
      background-repeat: no-repeat;
    }
    &.ui-state-error, &.ui-state-warning {
      i {
        background-image: url(/images/warning_16.png);
      }
    }
    &.no_close {
      .close_link {
        display: none;
      }
    }
  }
}

.user_content, .mceContentBody {
  position: relative;
  min-height: 5px;
  max-width: 100%;
  // firefox max-width images break the parent container
  @-moz-document url-prefix() {
    overflow-x: hidden;
  }
  a:not(.btn, .Button) {
    text-decoration: underline;
  }

  h3, .h3 {
    margin-top: 1em;
    margin-bottom: 1em;
  }
  table:not([cellpadding]) {
    margin-left: 5px;
    td {
      padding: 2px;
    }
  }
}

.user_content iframe,
.user_content video
 {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: 100%;
}

.reminder, .reminder-content {
  border: 1px solid #aaa;
  border-radius: 5px;
  margin: 5px;
  clear: both;
  font-size: 0.9em;
  h2, .h2 {
    margin-top: 0;
    background-color: #eee;
    text-transform: uppercase;
    color: #248;
    padding: 0px 10px;
    border-bottom: 1px solid #aaa;
    font-size: 1.2em;
    border-top-right-radius: 4px;
    border-top-left-radius: 4px;
  }
  .body {
    width: auto;
    padding: 5px 10px;
  }
}



#floating_reminders {
  cursor: move;
  padding: 5px 10px;
  position: absolute;
  top: 5px;
  left: 0px;
  background-color: #fe8;
  border: 2px solid #FBAD00;
  border-radius: 5px;
  width: 300px;
  z-index: 2;
  a {
    font-weight: bold;
    cursor: pointer;
  }
}

#right-side {
  h2, .h2 {
    .small_link {
      font-size: 0.6em;
      font-family: arial, sans-serif;
    }
  }
  h4.item_list_header, .h4.item_list_header {
    font-size: 1.3em;
    font-weight: bold;
    border-bottom: 1px solid #888;
    margin: 0;
  }
  ul.item_list {
    margin-top: 0;
    list-style-type: none;
    margin-left: 15px;
    &.limit_height {
      max-height: 150px;
      overflow: auto;
    }
  }
  p {
    margin-top: 0;
    margin-bottom: 1em;
  }
  table.summary {
    margin: 5px 0px;
    width: 100%;
    tbody th {
      font-weight: bold;
    }
  }
  table.notifications {
    border-top: 2px solid #999;
    border-collapse: collapse;
    tr {
      border-color: #999;
      td {
        border-color: #999;
        border-bottom: 2px solid #999;
      }
    }
  }
  table.courses {
    width: 100%;
    td {
      padding: 5px 5px 10px 10px;
      background-color: #eee;
      color: #888;
      .name {
        font-size: 1.5em;
        font-weight: bold;
      }
      .links {
        font-size: 0.8em;
        text-align: center;
      }
      a {
        text-decoration: none;
        color: #444;
        &:hover {
          text-decoration: underline;
        }
      }
    }
  }
  .events_list, .to-do-list {

    li.event, li.todo {
      i.icon-check {
        color: $ic-color-success;
      }
      .todo-badge {
        @include ic-badge-maker(18px);
        vertical-align: top;
        margin-top: 2px;
      }
    }

    .event-details,
    .todo-details {
      padding-right: $ic-sp;
      flex: 1;
      min-width: 1px;
      overflow: hidden;
      position: relative;

      &:after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        width: $ic-sp;
        background: linear-gradient(
          to right, rgba(255, 255, 255, 0) 0%,
          rgba(255, 255, 255, 1) 80%);
      }
    }

    .todo-details {
      // gets more padding/width to accommodate close X button
      padding-right: $ic-sp * 2.5;
      &:after {
        width: $ic-sp * 2.5;
        background: linear-gradient(
          to right, rgba(255, 255, 255, 0) 0%,
          rgba(255, 255, 255, 1) 50%);
      }
    }

    .todo-details__title,
    .event-details__title {
      + * {
        margin-top: $ic-sp / 4;
      }
    }

    .todo-details__context,
    .event-details__context {
      margin-bottom: $ic-sp / 4;
    }
  }
  .events_list {
    margin-bottom: $ic-sp * 1.5;
    .event-list-view-calendar {
      float: right;
      @include fontSize(12px);
      font-weight: normal;
      &[class*=icon-]:before, &[class^=icon-]:before {
        @include fontSize(16px);
        vertical-align: middle;
      }
    }
  }
  * + .events_list { margin-top: $ic-sp * 1.5; }
  .details {
    margin: 5px;
    padding: 5px 10px;
    border: 1px solid #888;
    border-radius: 5px;
    .header {
      color: #444;
      font-weight: bold;
    }
    .preview {
      margin: 5px 30px 10px;
      padding: 5px;
      border: 1px solid #aaa;
      text-align: center;
      border-radius: 5px;
    }
    .links {
      margin: 10px 0;
    }
  }
}

table.summary {
  width: auto;
  th, caption {
    text-align: left;
  }
  th, td, caption {
    padding: $ic-sp/2;
  }
  thead th, caption {
    font-weight: bold;
    border-bottom: 1px solid $ic-border-dark;
  }
  td, tbody th {
    border-bottom: 1px solid $ic-border-light;
    background-color: $ic-color-light;
  }
  table.subtable {
    th, td {
      border-top: 0;
      padding: 1px 5px 1px 0;
      font-size: 0.8em;
    }
  }
}

form table.formtable {
  margin: 0;
  padding: 0;
  width: auto;
}

table.formtable td {
  vertical-align: top;
  padding: 2px 3px;
}

.courses, .groups, .accounts {
  .name {
    font-size: 1.1em;
    font-weight: bold;
  }
  .unpublished {
    .name a {
      color: $ic-font-color--subdued;
    }
    i {
      color: $ic-font-color--subdued;
    }
  }
  .details {
    font-size: 0.8em;
    margin: 0 0 0 10px;
  }
  .info {
    clear: left;
    font-size: 0.8em;
    margin: 0 0 5px 10px;
    .links {
      color: #eee;
      a {
        color: $ic-font-color--subdued;
      }
    }
  }
}

.touch .course,
.touch .group,
.touch .account,
.course:hover,
.group:hover,
.account:hover {
  .course, .group, .account {
    .info {
      .links {
        color: $ic-hint-text;
        a {
          color: $ic-font-color-dark;
        }
      }
    }
  }
}

span.hint {
  color: $ic-font-color-dark;
  font-size: 0.8em;
}

.event_pending {
  opacity: 0.4;
}

.error_message {
  color: $ic-color-danger;
}

.formError {
  color: $ic-color-danger;
  font-size: 0.8em;
  padding-left: 15px;
}

.nobr {
  white-space: nowrap;
}

.mini_discussion {
  font-size: 0.8em;
  .name {
    font-weight: bold;
    margin-left: 10px;
  }
  .date {
    margin-left: 5px;
  }
  .message {
    font-size: 1.5em;
  }
}

.loading_image {
  background-color: $ic-color-light;
}

// the body part here is to make this selector more specific than the atr-*** ones in g_util_fancy_links.scss so this overrides
body .disabled_link {
  display: none;
}

.error_box {
  position: absolute;
  top: -1000px;
  left: -100px;
  z-index: 11;
  max-width: 200px;
  min-width: 100px;
  .error_text {
    max-height: 100px;
    overflow: auto;
    margin-bottom: 10px;
    background-color: #edd;
    border: 2px solid #a44;
    border-radius: 5px;
    padding: 5px;
  }
  .error_bottom {
    position: absolute;
    bottom: 0;
    left: 4px;
  }
}

.datetime_suggest {
  font-size: 0.8em;
  padding-left: 10px;
  color: $ic-dim-helper-text;
}

#submission_preview {
  margin: 20px auto;
  &.paper {
    min-width: 400px;
  }
  &.plain_text {
    width: 90%;
    font-family: courier, monospace;
  }
}

#sidebar .ui-widget {
  margin-bottom: 1em;
}

ul.notification_list {
  line-height: 1.7em;
  padding-left: 10px;
  margin-bottom: 20px;
}

ul.group_list {
  line-height: 1.7em;
  padding-left: 10px;
  margin-bottom: 20px;
}

$wizard-icon-size: 120px;
$wizard-bg-color: $ic-color-dark;

@keyframes icon-slide-down {
  from {
    transform: scale(0.7);
  }
  to {
    transform: scale(1);
  }
}

@keyframes icon-slide-up {
  from {
    transform: translate3d(0, 48px, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

#wizard_box {
  border-bottom: 1px solid #aaa;
  z-index: 111;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: none;
  h3, .h3 {
    border-bottom: 1px solid #aaa;
    margin: 0 0 10px;
    padding-bottom: 5px;
  }
  .wizard_content {
    @if $use_high_contrast {
      background-color: #fff;
    }
    @else {
      background-color: #eee;
    }
    border-top: 1px solid #888;
    padding: 10px;
    // :position relative
    @include clearfix;
    box-shadow: 0 0 10px #333;
    .links {
      float: right;
    }
    .wizard_options {
      float: left;
      width: 40%;
      padding-right: 20px;
      position: relative;
    }
    .wizard_details {
      float: left;
      width: 43%;
      display: none;
      border: 1px solid #aaa;
      border-radius: 5px;
      padding: 10px;
      margin: 0px 20px;
      color: #444;
      position: relative;
      // adding override to link appearance, as javascript depends on there being a .link class here
      a.link {
        background-image: none;
        padding: 0;
      }
      p {
        margin-top: 0;
      }
    }
    .wizard_options_list {
      list-style-type: none;
      margin: 0 10px 0 0;
      padding-left: 5px;
      li {
        line-height: 1.8em;
      }
      .option {
        cursor: pointer;
        font-weight: bold;
        color: #444;
        border-radius: 3px;
        &:hover {
          @if $use_high_contrast == false {
            background-color: $ic-color-light;
          }
        }
        &.completed a {
          color: #aaa;
        }
        &.selected {
          @if $use_high_contrast {
            a {
              color: $ic-font-color-dark;
              text-decoration: none;
            }
          }
          @else {
            background-color: $ic-color-light;
          }
        }
        a[class*=icon-], a[class^=icon-] {
          &:before {
            @include fontSize($ic-font-size--medium);
            line-height: 16px;
            vertical-align: text-top;
            color: #555;
          }
        }
      }
    }
  }
  &.wizard-box--course {
    transition: background 0.3s;
    height: 100%;
    border: none;
    background-size: cover;
    @if $use_high_contrast {
      background: rgba(darken($wizard-bg-color, 22%), 0.95);
    }
    @else {
      background: url("/images/wizard-bg.jpg") no-repeat center center $wizard-bg-color;
    }
    * {
      box-sizing: border-box;
    }
    h3 {
      padding: 0;
      margin: 0;
      border-bottom-color: rgba($ic-color-light, 0.15);
      font-weight: bold;
    }
    .wizard-box__feature-icon {
      display: none;
      @include breakpoint(desktop) {
        display: block;
        text-align: center;
        margin: 0;
        margin: (-($ic-sp * 6)) 0 ($ic-sp * 2);
        transform: translate3d(0, 0, 0) scale(0.7);
        transform-origin: center top;
        animation-duration: 0.5s;
        animation-name: icon-slide-down;
        animation-timing-function: $ic-transition;
        animation-fill-mode: forwards;
      }

      i[class^=icon-] {
        width: ($wizard-icon-size + $ic-sp * 4) / 2;
        height: ($wizard-icon-size + $ic-sp * 4) / 2;
        background: $wizard-bg-color;
        border-radius: 100%;
        font-size: $wizard-icon-size / 2;
        &:before {
          font-size: ($wizard-icon-size - $ic-sp) / 2;
          color: $ic-color-light;
          line-height: ($wizard-icon-size + $ic-sp * 4) / 2;
        }
        @include breakpoint(desktop) {
          width: $wizard-icon-size + $ic-sp * 4;
          height: $wizard-icon-size + $ic-sp * 4;
          font-size: $wizard-icon-size;
          &:before {
            font-size: $wizard-icon-size - $ic-sp;
            line-height: $wizard-icon-size + $ic-sp * 4;
          }
        }
      }
    }
    .wizard-box__container {
      height: 100%;
      display: flex;
      flex-direction: column;
      @if $use_high_contrast == false {
        background: linear-gradient(to bottom, rgba($wizard-bg-color, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
      }
    }
    .wizard-box__columns {
      display: flex;
      flex-direction: column-reverse;
      flex: 1;
      @include breakpoint(desktop) {
        flex-direction: row;
      }
    }
    .wizard-box__close-wizard {
      width: 100%;
    }
    .wizard-box__logo {
      padding: $ic-sp;
      flex: 0 0 34%;
      @include breakpoint(desktop) {
        flex: 0 0 ($ic-sp * 10);
        padding: $ic-sp * 2;
      }

      .svg-canvas-logo {
        display: block;
        width: $ic-sp * 10;
        @include breakpoint(desktop) {
          width: $ic-sp * 12;
        }
      }
    }
    .wizard_content {
      background: transparent;
      color: $ic-color-light;
      padding: 0;
      border: none;
      box-shadow: none;
      height: 100%;
      .links {
        display: none;
      }
      .wizard_options,
      .wizard_details {
        float: none;
        width: auto !important;
        height: auto !important;
      }
      .wizard_options {
        padding: 0;
        display: flex;
        @if $use_high_contrast {
          background: rgba(black, 0.2);
        }
        @else {
          background: rgba(desaturate(darken($wizard-bg-color, 11), 2), 0.9);
        }
        @include breakpoint(desktop) {
          flex-direction: column;
          flex: 0 0 30%;
        }
      }
      .wizard_options_list {
        margin: 0;
        padding: $ic-sp;
        flex: 1;
        display: flex;
        flex-direction: column;
        @include breakpoint(desktop) {
          padding: 0;
        }

        .option {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: center;
          border-radius: 0;
          font-weight: normal;
          @include breakpoint(desktop) {
            @include fontSize(15px);
          }

          &.selected {
            background: rgba($ic-color-light, 0.1);
            a.header {
              border-left-color: $ic-brand-primary;
            }
          }
          &.completed {
            a.header {
              background-image: url("/images/wizard-todo-checked.svg");
            }
          }
          a.header {
            flex: 1;
            display: flex;
            width: 100%;
            align-items: center;
            padding: 8px ($ic-sp * 3) 8px ($ic-sp * 3);
            color: $ic-color-light;
            text-decoration: none;
            background: url("/images/wizard-todo-unchecked.svg") no-repeat $ic-sp 50%;
            background-size: 16px 16px;
            line-height: 1.2;
            border-left: ($ic-sp / 3) solid transparent;
            @include breakpoint(desktop) {
              background-position: ($ic-sp * 2) 50%;
              background-size: ($ic-sp * 2) ($ic-sp * 2);
              padding-left: $ic-sp * 5;
            }
          }
        }
      }
      .wizard_details__layout {
        flex: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        @include breakpoint(desktop) {
          align-items: center;
        }
      }
      h3.wizard_details__headline {
        font-size: $ic-sp * 3;
        line-height: 1;
        color: rgba($ic-color-light, 0.95);
        border-bottom: none;
        flex: 0.75;
        align-self: center;
        text-align: center;
        @include breakpoint(mini-tablet) {
          font-size: $ic-sp * 5;
          letter-spacing: -1px;
          flex: 1;
        }

        @include breakpoint(desktop) {
          font-size: $ic-sp * 7;
          display: flex;
          width: 100%;
          justify-content: center;
          align-self: auto;
        }
      }
      .wizard_details__calltoaction {
        margin-top: $ic-sp * 2;
      }
      .wizard_details__container {
        flex: 3;
        @include breakpoint(desktop) {
          flex: 2;
        }
      }
      .wizard_details {
        margin: 0;
        max-height: none !important;
        border: none;
        border-radius: 0;
        text-align: center;
        background: rgba($ic-color-light, 0.85);
        padding: $ic-sp * 2;
        overflow: visible !important;
        animation-duration: 0.5s;
        animation-name: icon-slide-up;
        animation-timing-function: $ic-transition;
        @if $use_high_contrast {
          background: $ic-color-light;
          color: desaturate(darken($wizard-bg-color, 25), 2);
        }
        @else {
          background: rgba($ic-color-light, 0.85);
          color: desaturate(darken($wizard-bg-color, 20), 2);
        }
        @include breakpoint(tablet) {
          max-width: 600px;
          border-radius: $ic-sp / 2;
          padding: $ic-sp * 3;
        }

        p {
          line-height: 1.5;
          @include breakpoint(desktop) {
            @include fontSize(15px);
          }

          &:last-of-type {
            margin-bottom: 0;
          }
        }
        a.link {
          padding: $ic-sp ($ic-sp * 2);
          background-image: none;
        }
      }
    }
  }
}

#content_tags_dialog {
  h3, .h3 {
    margin: 0;
    padding: 0;
    font-size: 0.8em;
    color: #888;
  }
  .tags {
    list-style-type: none;
    padding: 0;
    margin: 0;
    > .tag {
      display: block;
      float: left;
      border: 1px solid #ccc;
      border-radius: 3px;
      background-color: #cdf;
      padding: 1px 4px;
      margin: 2px 3px;
      font-size: 0.9em;
      &.uneditable {
        background-color: #ddd;
        .delete_link {
          display: none;
        }
      }
    }
  }
}

.hidden-readable {
  position: absolute;
  left: -100000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#keyboard_navigation {
  display: none;
}

#keyboard_navigation, .keyboard_navigation {
  ul.navigation_list {
    padding: 0;
    margin: 0;
    list-style-type: none;
    line-height: 1.7em;
    li {
      span {
        padding: 1px 2px;
      }
      .keycode {
        font-weight: bold;
        font-size: 1.2em;
        color: #248;
        font-family: courier, monospace;
        text-align: right;
      }
    }
  }
}

.communication_messages_list {
  .communication_message, .communication_sub_message {
    .context_code {
      display: none;
    }
  }
  &.communication_messages_show_context {
    .communication_message, .communication_sub_message {
      .context_code {
        display: inline;
      }
    }
  }
}

.communication_message {
  margin: 0 0.5em 0.5em 0.5em;
  padding: 0 0 0.5em 0;
  width: auto;
  color: #000;
  border-bottom: 1px solid #ddd;
  &.selected {
    border-width: 1px;
  }
  div {
    &.header {
      padding: 2px 5px;
      /* :border-bottom 1px solid #eee */
      _height: 25px;
      color: #666;
      .header_title {
        float: left;
      }
      .header_icon {
        float: left;
        padding-top: 5px;
        &.announcement_header_icon {
          display: none;
        }
      }
      .title {
        margin-left: 10px;
        font-size: 1em;
        font-weight: bold;
        // :color #444

      }
      .sub_title {
        margin-left: 30px;
        line-height: 0.8em;
      }
      .context_code {
        font-size: 0.8em;
        padding-right: 5px;
        padding-left: 0;
      }
      .context_name {
        font-size: 0.8em;
        padding: 0 5px;
        color: inherit;
        text-decoration: none;
      }
      .points_possible {
        font-size: 0.8em;
        padding-right: 5px;
        padding-left: 0;
      }
      .podcast {
        display: none;
      }
      .user_name {
        white-space: nowrap;
        font-size: 0.8em;
      }
      .post_date {
        float: right;
        padding-right: 10px;
        font-size: 0.8em;
        padding-top: 0.2em;
        .new-and-total-badge {
          float: right;
        }
      }
      .under_links {
        float: right;
        clear: right;
        padding-right: 10px;
        font-size: 0.8em;
        a {
          color: inherit;
        }
      }
      .link_box {
        float: right;
        width: 60px;
        text-align: right;
        min-height: 10px;
        margin-right: 5px;
        a {
          opacity: 0;
          &:hover, &:focus {
            opacity: 1;
          }
        }
      }
    }
    &.content {
      padding: 5px 5px 1px 50px;
      color: #444;
      .links {
        text-align: right;
        margin-right: 2.5em;
        display: block;
        font-size: 0.8em;
        color: #888;
        a {
          color: #666;
          &.brief_footer_link {
            display: none;
          }
          &.verbose_footer_link {
            display: inline;
          }
        }
      }
      .subcontent {
        padding-top: 5px;
      }
      .status {
        text-align: right;
        font-size: 0.8em;
      }
      .original_post_date {
        text-align: right;
        font-size: 0.8em;
        padding-right: 44px;
        color: #888;
      }
      .statistics {
        td {
          &.name {
            width: 20%;
            vertical-align: top;
            padding: 5px 0;
            border-bottom: 1px solid #eee;
            .text {
              font-size: 0.8em;
            }
          }
          &.stats {
            vertical-align: top;
            padding: 5px 0 5px 10px;
            border-bottom: 1px solid #eee;
            .answer {
              .text {
                font-size: 0.8em;
              }
              .answer_bar {
                margin-bottom: 3px;
                border: 1px solid #888;
                background: #ccc;
                height: 10px;
              }
              &.correct_answer {
                .answer_bar {
                  background: #8EC778;
                }
              }
            }
          }
        }
      }
      .attachments_list {
        a {
          color: #888;
        }
      }
      .extras {
        font-size: 0.8em;
        color: #888;
      }
    }
    &.footer {
      margin: 5px;
    }
    &.base_links {
      font-size: 1.5em;
      text-align: center;
    }
    &.subcontent {
      /* :border-left 1px solid #ddd */
    }
  }
  &.pinned_notification {
    border: 1px solid #bbb;
    background: #ffb;
    .header {
      .links {
        float: right;
        font-size: 0.8em;
      }
    }
    .user_content {
      p:last-child {
        margin-bottom: 0;
      }
    }
  }
  &.has_podcast {
    .header {
      .podcast {
        display: block;
        float: right;
        opacity: 0.7;
      }
    }
  }
  a.disable_item_link {
    visibility: hidden;
    float: right;
    margin-right: 6px;
  }
  // use less padding on ones that are a boostrap .alert
  //(like enrollment invitation and account notifications)
  &.alert div.content {
    padding-left: 35px;
  }
}

.communication_message_hover {
  div.header {
    .link_box {
      a {
        opacity: 0.5;
      }
    }
  }
  a.disable_item_link {
    visibility: visible;
    opacity: 0.5;
    &:hover {
      opacity: 1;
    }
  }
}

.brief_communication_message {
  div.header {
    .link_box {
      display: none;
    }
  }
  div.content {
    .links a {
      &.brief_footer_link {
        display: inline;
      }
      &.verbose_footer_link {
        display: none;
      }
    }
  }
}

.communication_message.announcement {
  div.header {
    .header_icon.announcement_header_icon {
      display: inline;
    }
    .header_icon.discussion_topic_header_icon {
      display: none;
    }
  }
}

.communication_message.conversation {
  .submission {
    ul {
      margin: 0 10px 10px 0;
      padding: 0;
    }
    li {
      padding: 2px 5px;
      margin: 0 0 2px 0;
      list-style: none;
      background: #e8e8e8;
    }
    .user_name {
      font-size: 0.8em;
      padding: 0;
    }
    .score {
      float: right;
      padding-right: 10px;
    }
  }
}

.communication_sub_message {
  margin: 0 2.5em 2px 0em;
  padding: 0;
  width: auto;
  color: #000;
  border-width: 0px;
  font-size: 0.85em;
  background-color: #f2f2f2;
  div {
    &.header, li {
      padding: 0 5px;
      border-width: 0px;
      color: #999;
      .link_box {
        float: right;
        width: 60px;
        text-align: right;
        min-height: 10px;
        margin-right: 5px;
        opacity: 0.5;
        a {
          visibility: hidden;
        }
        &:hover {
          opacity: 1;
          a {
            visibility: visible;
          }
        }
      }
      .header_title {
        float: left;
      }
      .user_name {
        padding-left: 5px;
        white-space: nowrap;
      }
      .post_date {
        float: right;
        padding-right: 10px;
        font-size: 0.9em;
        padding-top: 0.2em;
      }
      a {
        color: #888;
      }
    }
    &.content {
      padding: 1px 5px 1px 30px;
      color: #444;
      .less_important {
        color: #888;
        display: block;
        text-align: right;
        padding-right: 20px;
      }
      a.textarea {
        display: block;
        border-radius: 4px;
        border: 1px solid #aaa;
        background-color: #fff;
        text-decoration: none;
        padding: 2px;
        width: 94%;
      }
      textarea {
        border: 1px solid #aaa;
        border-radius: 4px;
        padding: 2px;
        font-size: 1.1em;
        font-family: Arial, sans-serif;
        width: 94%;
        &.dim {
          height: 1em;
          color: #aaa;
          font-family: arial, sans-serif;
        }
      }
    }
    &.behavior_content {
      color: #999;
      padding: 2px 5px 2px 30px;
      a {
        color: #888;
      }
    }
    &.footer {
      float: right;
    }
  }
  &.toggled_communication_sub_message {
    display: none;
  }
  &.lonely_behavior_message {
    background-color: transparent;
    div.content {
      a.textarea {
        display: inline;
        color: inherit;
        padding: 0;
        margin-right: 15px;
        border-width: 0;
        &:hover,
        &:focus {
          text-decoration: underline;
        }
      }
      .less_important {
        display: inline;
        color: inherit;
      }
    }
  }
}

html > body .communication_sub_message .content textarea {
  width: 97%;
}

html > body .communication_sub_message .content a.textarea {
  width: 97%;
}

// hide the '.under_links' untill you hover to message, but only if its not IE6, since it can't do :hover on a <div>
html > body .communication_message div.header .under_links {
  opacity: 0;
}

html > body .communication_message:hover div.header .under_links {
  opacity: 1;
}

.new_activity_message {
  a.textarea {
    display: block;
    border-radius: 4px;
    border: 1px solid #aaa;
    color: #888;
    text-decoration: none;
    cursor: text;
    background-color: #fff;
    padding: 2px;
    width: 94%;
  }
  .message_type {
    img {
      border-radius: 2px;
      padding: 0 5px;
      cursor: pointer;
      border: 1px solid #fff;
      &:hover {
        border-color: #ccc;
      }
      &.selected {
        border-color: #888;
        background-color: #eee;
      }
    }
  }
  form {
    textarea {
      height: 4.8em;
      border: 1px solid #aaa;
      border-radius: 4px;
      padding: 2px;
      font-size: 1.1em;
      font-family: Arial, sans-serif;
      width: 94%;
    }
  }
}

html > body .new_activity_message a.textarea {
  width: 97%;
}

html > body .new_activity_message form textarea {
  width: 97%;
}

.notification_list {
  li a {
    padding-left: 20px;
    background-image: url(/images/other_icon.png);
    background-repeat: no-repeat;
    background-position: left center;
    &.announcement {
      background-image: url(/images/announcement_icon.png);
    }
    &.course_content {
      background-image: url(/images/course_content_icon.png);
    }
    &.due_date {
      background-image: url(/images/due_date_icon.png);
    }
    &.discussion {
      background-image: url(/images/discussion_icon.png);
    }
    &.grading {
      background-image: url(/images/grading_icon.png);
    }
    &.invitation {
      background-image: url(/images/invitation_icon.png);
    }
    &.message {
      background-image: url(/images/message_icon.png);
    }
  }
}

.module_legend {
  float: right;
  clear: right;
  border: 1px solid #ccc;
  min-width: 200px;
  margin-bottom: 5px;
  margin-left: 10px;
  &.module_legend_locked {
    .title {
      display: none;
    }
    .locked_title, .locked_message {
      display: inline;
    }
  }
  .locked_title, .locked_message {
    display: none;
  }
  .header {
    border-bottom: 1px solid #ccc;
    background-color: #eee;
    font-size: 1.2em;
    font-weight: bold;
    padding: 2px 5px;
  }
  .content {
    padding: 5px 20px 5px 10px;
    max-height: 50px;
    overflow: auto;
    ul {
      padding: 0;
      margin: 0;
      list-style-type: none;
      .context_module_item .type_icon {
        background: url(/images/file.png) no-repeat left top;
      }
      .attachment_module_item .type_icon {
        background-image: url(/images/file_download.png);
      }
      .assignment_module_item .type_icon {
        background-image: url(/images/assignment.png);
      }
    }
  }
  .footer {
    text-align: right;
    font-size: 0.8em;
  }
  .context_module_item {
    .criterion {
      width: 16px;
      height: 16px;
      &.completed {
        img {
          visibility: hidden;
        }
        background: url(/images/pass.png) no-repeat left top;
        &:hover {
          img {
            visibility: visible;
          }
          background: transparent;
        }
      }
    }
  }
}

body > #ui-datepicker-div {
  display: none;
}

#instructure_dropdown_list {
  z-index: 10;
  .list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow: auto;
  }
  .option {
    &.ui-state-default {
      &.minimal {
        background: #fff;
        border-color: #DDE8F0;
      }
    }
    .ui-icon {
      float: left;
      margin-top: 0.2em;
      margin-right: 2px;
    }
  }
}

.communication_message .media_comment_thumbnail {
  margin: 3px 0;
}

.quoted_text_holder {
  .show_quoted_text_link {
    font-size: 0.8em;
  }
}

#sequence_details {
  .sequence_list {
    margin-left: 10px;
    li {
      padding-left: 20px;
      background: url(/images/ball.png) no-repeat center left;
      &.prev, &.next {
        font-size: 0.9em;
      }
      &.prev {
        background-image: url(/images/uptick.png);
      }
      &.next {
        background-image: url(/images/downtick.png);
      }
      &.current {
        font-weight: bold;
        font-size: 1.1em;
        margin: 2px 0;
      }
    }
  }
}

body.padless-content .ic-Layout-contentMain,
.ic-Layout-contentMain.padless {
  #sequence_footer {
    margin-left: 10px;
    margin-right: 10px;
    padding-top: 0;
  }
}

#sequence_footer {
  padding-top: $ic-sp*2;
  .next, .prev {
    width: 150px;
    overflow: hidden;
    .title {
      display: block;
      font-size: 0.8em;
      white-space: nowrap;
    }
    &:hover {
      .title {
        text-decoration: none;
      }
    }
  }
  .next {
    float: right;
  }
  .prev {
    float: left;
  }
  .all {
    clear: right;
    float: right;
  }
}

.content_lock_icon {
  cursor: pointer;
}

#module_prerequisites_list {
  list-style-type: none;
  color: $ic-color-medium;
  li.module {
    padding: 5px 0;
    vertical-align: middle;
    ul {
      list-style-type: none;
      padding: 5px 0;
    }
    li.requirement {
      vertical-align: middle;
      .description {
        font-size: 0.8em;
      }
      &.locked_requirement {
        .description {
          padding-left: $ic-sp*2;
        }
        a {
          color: $ic-color-medium;
        }
      }
    }
    &.locked {
      cursor: pointer;
      h3 {
        display: inline-block;
        padding-left: $ic-sp;
      }
      ul {
        display: none;
      }
    }
  }
}

h2.h-margin-top, h3.h-margin-top, .h2.h-margin-top, .h3.h-margin-top {
  margin-top: 20px;
}

form.user_content_post_form {
  display: none;
}

#change_calendar_version_link_holder {
  float: right !important;
  background: none !important;
}

#change_calendar_version_link_holder a, .dashboard-toggle a {
  margin-right: 10px;
  padding: 1px 10px;
  border-radius: 3px;
  @include vertical-gradient(#0abdff, #008fd6);
  text-decoration: none !important;
  &:hover {
    border-color: #165A92;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  }
  @include fontSize($ic-font-size--xsmall);
  font-family: GillSans, Calibri, Trebuchet, sans-serif;
  border: 1px solid #1e7eca;
  color: white !important;
  text-shadow: rgba(0, 0, 0, 0.5) 1px 0 1px;
  -moz-user-select: none;
  cursor: pointer;
}

.equation_image {
  vertical-align: middle;
}

.dashboard-toggle {
  display: block;
  padding: 10px 0 0;
}

#breadcrumbs .dashboard-toggle {
  margin: 4px 0;
}

.with-fixed-bottom .ic-Layout-wrapper {
  padding-bottom: 60px;
  box-sizing: border-box;
}

#fixed_bottom {
  bottom: 0;
  // The styles below are no longer needed for the masquerading or student view;
  // however, we need to keep them for other fixed warnings
  >*:not(.ic-alert-masquerade-student-view) {
    i {
      vertical-align: middle;
      margin-right: 10px;
    }
    b {
      line-height: 28px;
      vertical-align: middle;
    }
  }
  .fixed_warning {
    background-color: #FDD;
    border-width: 2px 0 0 0;
    border-style: solid;
    border-color: black;
    padding: 15px;
    opacity: 0.9;
    color: black;
  }
}

.hidden-text {
  overflow: hidden;
  text-indent: -10000px;
  white-space: nowrap;
}

.hidden-inline-text {
  display: inline-block;
  height: 0;
  overflow: hidden;
  text-indent: -10000px;
  white-space: nowrap;
  width: 0;
}

.nav-badge {
  @include ic-badge-maker;
  float: right;
}

.unread-grade {
  float: left;
  display: inline-block;
  line-height: 8px;
  width: 8px;
  margin-top: 6px;
  margin-left: -16px;
  background-color: #06a9ee;
  border-radius: 4px;
}

.clear {
  clear: both;
}
